<template>
    <a-table :columns="columns" :data-source="dataSource"></a-table>
</template>
<script setup>
const columns = [
    {
        title: '序号',
        dataIndex: 'id',
        key: 'id',
    },
    {
        title: "开票日期",
        dataIndex: "invoiceDate",
        key: "invoiceDate"
    },
    {
        title: '开票金额（元）',
        dataIndex: 'invoiceAmount',
        key: 'invoiceAmount'
    },
    {
        title: "发票类型",
        dataIndex: "invoiceType",
        key: "invoiceType"
    }, {
        title: '税点',
        dataIndex: 'taxPoint',
        key: 'taxPoint'
    },
    {
        title: '发票编号',
        dataIndex: 'invoiceNumber',
        key: ' invoiceNumber '
    }, {
        title: '快递公司 ',
        dataIndex: 'expressCompany',
        key: ' expressCompany '
    }, {
        title: ' 快递单号 ',
        dataIndex: 'trackingNumber',
        key: ' trackingNumber '
    }, {

        title: "状态 ",
        dataIndex: "status",
        key: " status "
    }, {
        title: "申请人 ",
        dataIndex: "applicant",
        key: " applicant"
    }
]

const dataSource = [
    {
        "id": 1,
        "invoiceDate": "2022-01-01",
        "invoiceAmount": 10000,
        "invoiceType": "增值税普通发票",
        "taxPoint": "3%",
        "invoiceNumber": "1234567890",
        "expressCompany": '顺丰快递',
        "trackingNumber": 'SF1234567890',
        "status": '已开票',
        'applicant': '张三'
    }, {
        "id": 2,
        "invoiceDate": "2022-02-05",
        "invoiceAmount": 20000,
        'invoicetype': '增值税专用发票',
        'taxpoint': '5%',
        'invoicenumber': '0987654321',
        'expresscompany': "圆通快递",
        'trackingnumber': "YT0987654321",
        'status': "未开票",
        'applicant': "李四"
    }, {
        "id": 3,
        "invoiceDate": "2022-03-10",
        "invoiceAmounts": 3000,
        invoiceType: '增值税普通发票',
        taxPoint: '4%',
        invoiceNumber: "2468135790",
        expressCompany: "申通快递 ",
        trackingNumber: "ST2468135790 ",
        status: "已邮寄 ",
        applicant: "王五"
    }
]



const props = defineProps({
    id: {
        type: String,
    }
})
const { id } = toRefs(props)
watch(id, () => {
    refresh(id.value);
});
const refresh = (id) => {
    console.log("negotiateChanges fatch Id", id)
}
</script>